﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chat.Server
{
    /// <summary>
    /// Sent by the chat server to its clients, notifying them either about
    /// new user(s) logged in or about the existent chat users that logged out.
    /// </summary>
    [Serializable]
    public class UsersUpdateCmd : ServerCmd
    {
        /// <summary>
        /// Whether the specified user(s) logged in or out.
        /// </summary>
        public UserConnectState ConnectState { get; protected set; }
        /// <summary>
        /// The csv list of nick names of the users that logged in/out.
        /// </summary>
        public string UsersCsv { get; protected set; }

        public UsersUpdateCmd(UserConnectState connectState, string usersCsv)
        {
            ConnectState = connectState;
            UsersCsv = usersCsv;
        }
    }
}
